package com.dxh;


import com.dxh.client.RPCConsumer;
import com.dxh.service.IUserService;

/**
 * @Author: Dengxh
 * @Date: 2021/1/17 18:28
 * @Description:
 */
public class ConsumerBoot {

    public static void main(String[] args) throws InterruptedException {
        RPCConsumer rpcConsumer = new RPCConsumer();
        IUserService proxy = (IUserService) rpcConsumer.createProxy(IUserService.class);
        //2. 循环给服务器写数据
        while (true){
            String result = proxy.sayHello("are you ok !!");
            System.out.println("返回值："+result);
            Thread.sleep(2000);
        }
    }
}
